package cn.webrx.wxs.mapper;

import cn.webrx.wxs.entity.Admin;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;
import java.util.Map;

public interface AdminMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Admin record);

    Admin selectByPrimaryKey(Integer id);

    List<Admin> selectAll();

    int updateByPrimaryKey(Admin record);

    @Select("select salt,password from ws_admin where account = #{account}")
    public Map<String, String> checkLogin(String account);

    @Update("update ws_admin set password=#{password},salt=#{salt} where account=#{account}")
    public int updatePassword(Map<String, String> v);
}